package com.rykj.qxj.server.dao;

import com.rykj.qxj.server.common.ZmanagerBaseMapper;
import com.rykj.qxj.server.model.entity.FieldRule;
import com.rykj.qxj.server.model.entity.FieldTask;
import com.rykj.qxj.server.model.entity.Task;
import org.apache.ibatis.annotations.Param;

import java.util.List;
import java.util.Map;

public interface TaskMapper extends ZmanagerBaseMapper<Task> {

    void saveTask(Task task);

    void saveFieldTasks(@Param("fieldTasks") List<FieldTask> fieldTasks);

    void saveFieldRules(@Param("fieldRules") List<FieldRule> fieldRules);

    void updateTask(Task task);

    void deleteFieldTasks(Task task);

    void deleteFieldRules(Task task);

    void deleteTask(Integer id);

    Task getTaskDetails(Integer id);

    List<Map<String,Object>> getTaskList(Map<String, Object> paraMap);

    List<Map<String,Object>> getAuditMetadataList(Integer taskId);

    List<Map<String,Object>> getFieldfRules(Integer fieldId);

    List<Map<String, Object>> getUnTaskFields(Integer tableId);

    List<Map<String, Object>> getFieldRules(Integer taskId);

    Map<String, Object> getDatabaseInfoByTaskId(Integer taskId);

    void updateTaskStatus(Map<String, Object> paraMap);

    void updateTaskExecuteTime(Integer taskId);

    List<Map<String,Object>> getAllNormalTasks();

    List<Integer> getTaskIdByName(String taskName);
}
